<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%>
<%@ page import="javax.sql.*"%>
<%@ page import="org.osgi.framework.*"%>
<%@ page import="com.gzgi.framework.*"%>
<%@ page import="com.gzgi.framework.util.*"%>
<%@ page import="com.gzgi.framework.context.*"%>
<%@ page import="com.gzgi.framework.config.*"%>
<%@ page import="com.gzgi.osgi.runtime.*"%>
<%@ page import="com.gzgi.osgi.modules.hibernate.*"%>
<%@ page import="com.gzgi.osgi.modules.service.*"%>
<%
        System.setProperty("aQute.fileinstall.dir", MessageProperties.getConfigRootPath()+"/load");
        OSGiRuntime runtime = OSGiRuntime.getRuntime();
        BundleContext bundleContext = runtime.getBundleContext();
        System.out.println(bundleContext);
		 
        ServiceReference[] refs = bundleContext.getServiceReferences(EntityService.class.getName(), "(component.name=entityService)");
		if ( refs != null) {
			Object object =  bundleContext.getService(refs[0]);
			System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
			System.out.println("object:"+object.getClass().getName());
			String hsql = " select a from com.gzgi.framework.dataitem.DataItem as a where a.nodeCode = 'province' ";

			if(object.getClass().isAssignableFrom(EntityService.class)){
				EntityService entityService = (EntityService)object;
                System.out.println("entityService:"+entityService);
			}
		}
 %>